/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * PanelSignosVitales.java
 *
 * Created on 15/02/2011, 15:50:23
 */

package presentacion.evolucion;

import hibernate.objeto.ExamenFisico;
import hibernate.objeto.Triage;
import java.awt.event.KeyListener;
import javax.swing.JSpinner.DefaultEditor;
import logica.CapaLogica;
import presentacion.utilidad.maquetado.Fuente;

/**
 *
 * @author Rafa Salis
 */
public class DatosSignosVitales extends javax.swing.JPanel {

    /** Creates new form PanelSignosVitales */
    public DatosSignosVitales() {
        initComponents();
    }

    /**
     * Setea el estado de los campos.
     *
     * @param estado El estado a setear
     */
    public void setearEstadoCampos(boolean estado) {
        tensionArterialDiastolica.setEnabled(estado);
        tensionArterialSistolica.setEnabled(estado);
        frecuenciaCardiaca.setEnabled(estado);
        frecuenciaRespiratoria.setEnabled(estado);
        saturacionOxigeno.setEnabled(estado);
        temperatura.setEnabled(estado);
        eva.setEnabled(estado);
        glucemia.setEnabled(estado);
        tiempoFocoNeurologico.setEnabled(estado);
    }

    /**
     * Permite visualizar los detalles del examen físico correspondiente al
     * panel signos vitales.
     *
     * @param examenFisico El examen físico a visualizar
     */
    public void exhibirDatosSignosVitales(ExamenFisico examenFisico) {
        tensionArterialSistolica.setValue(
                examenFisico.getTensionArterialSistolicaExamenFisico());

        tensionArterialDiastolica.setValue(
                examenFisico.getTensionArterialDiastolicaExamenFisico());

        frecuenciaCardiaca.setValue(
                examenFisico.getFrecuenciaCardiacaExamenFisico());

        frecuenciaRespiratoria.setValue(
                examenFisico.getFrecuenciaRespiratoriaExamenFisico());

        saturacionOxigeno.setValue(
                examenFisico.getSaturacionOxigenoExamenFisico());

        temperatura.setValue(
                examenFisico.getTemperaturaExamenFisico());

        eva.setValue(
                examenFisico.getEvaExamenFisico());

        glucemia.setValue(
                examenFisico.getGlucemiaExamenFisico());

        tiempoFocoNeurologico.setValue(
                examenFisico.getTiempoFocoNeurologicoExamenFisico());
    }

    /**
     * Permite visualizar los detalles del triage correspondiente al panel
     * signos vitales.
     *
     * @param triage El triage a visualizar
     */
    public void exhibirDatosSignosVitales(Triage triage) {
        tensionArterialSistolica.setValue(triage.
                getTensionArterialSistolicaTriage());

        tensionArterialDiastolica.setValue(triage.
                getTensionArterialDiastolicaTriage());

        frecuenciaCardiaca.setValue(triage.
                getFrecuenciaCardiacaTriage());

        frecuenciaRespiratoria.setValue(triage.
                getFrecuenciaRespiratoriaTriage());

        saturacionOxigeno.setValue(triage.
                getSaturacionOxigenoTriage());

        temperatura.setValue(triage.
                getTemperaturaTriage());

        eva.setValue(triage.
                getEvaTriage());

        glucemia.setValue(triage.
                getGlucemiaTriage());

        tiempoFocoNeurologico.setValue(triage.
                getTiempoFocoNeurologicoTriage());
    }

    /**
     * Carga todos los datos ingresados en pantalla.
     *
     * @param El arreglo en donde cargar la info
     */
    public void recopilarInformacionSignosVitales(
            Object[] datosExamenFisicoAmbulatorio) {
        //SIGNOS_VITALES 7: TENSION_ARTERIAL_SISTOLICA
        datosExamenFisicoAmbulatorio[
                CapaLogica.SIGNOS_VITALES_TENSION_ARTERIAL_SISTOLICA] =
                tensionArterialSistolica.getValue();

        //SIGNOS_VITALES 8: TENSION_ARTERIAL_DIASTOLICA
        datosExamenFisicoAmbulatorio[
                CapaLogica.SIGNOS_VITALES_TENSION_ARTERIAL_DIASTOLICA] =
                tensionArterialDiastolica.getValue();

        //SIGNOS_VITALES 9: FRECUENCIA_CARDIACA
        datosExamenFisicoAmbulatorio[
                CapaLogica.SIGNOS_VITALES_FRECUENCIA_CARDIACA] =
                frecuenciaCardiaca.getValue();

        //SIGNOS_VITALES 10: FRECUENCIA_RESPIRATORIA
        datosExamenFisicoAmbulatorio[
                CapaLogica.SIGNOS_VITALES_FRECUENCIA_RESPIRATORIA] =
                frecuenciaRespiratoria.getValue();

        //SIGNOS_VITALES 11: SATURACION_OXIGENO
        datosExamenFisicoAmbulatorio[
                CapaLogica.SIGNOS_VITALES_SATURACION_OXIGENO] =
                saturacionOxigeno.getValue();

        //SIGNOS_VITALES 12: TEMPERATURA
        datosExamenFisicoAmbulatorio[
                CapaLogica.SIGNOS_VITALES_TEMPERATURA] =
                temperatura.getValue();

        //SIGNOS_VITALES 13: EVA
        datosExamenFisicoAmbulatorio[
                CapaLogica.SIGNOS_VITALES_EVA] =
                eva.getValue();

        //SIGNOS_VITALES 14: GLUCEMIA
        datosExamenFisicoAmbulatorio[
                CapaLogica.SIGNOS_VITALES_GLUCEMIA] =
                glucemia.getValue();

        //SIGNOS_VITALES 15: TIEMPO_FOCO_NEUROLOGICO
        datosExamenFisicoAmbulatorio[
                CapaLogica.SIGNOS_VITALES_TIEMPO_FOCO_NEUROLOGICO] =
                tiempoFocoNeurologico.getValue();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        textoFrecuenciaRespiratoria = new javax.swing.JLabel();
        tensionArterialSistolica = new javax.swing.JSpinner();
        textoTensionArterialSistolica = new javax.swing.JLabel();
        textoTensionArterialDiastolica = new javax.swing.JLabel();
        eva = new javax.swing.JSpinner();
        textoTiempoFocoNeurologico = new javax.swing.JLabel();
        tiempoFocoNeurologico = new javax.swing.JSpinner();
        glucemia = new javax.swing.JSpinner();
        textoGlucemia = new javax.swing.JLabel();
        saturacionOxigeno = new javax.swing.JSpinner();
        textoTemperatura = new javax.swing.JLabel();
        frecuenciaRespiratoria = new javax.swing.JSpinner();
        textoSaturacionOxigeno = new javax.swing.JLabel();
        temperatura = new javax.swing.JSpinner();
        textoEVA = new javax.swing.JLabel();
        frecuenciaCardiaca = new javax.swing.JSpinner();
        tensionArterialDiastolica = new javax.swing.JSpinner();
        textoFrecuenciaCardiaca = new javax.swing.JLabel();

        setBorder(javax.swing.BorderFactory.createTitledBorder("Signos Vitales"));
        setMinimumSize(new java.awt.Dimension(0, 0));

        textoFrecuenciaRespiratoria.setFont(Fuente.FUENTE_LABEL);
        textoFrecuenciaRespiratoria.setForeground(Fuente.COLOR_NORMAL);
        textoFrecuenciaRespiratoria.setText("Frecuencia respiratoria (por minuto)");
        textoFrecuenciaRespiratoria.setPreferredSize(new java.awt.Dimension(179, 20));

        tensionArterialSistolica.setFont(Fuente.FUENTE_TEXTFIELD);
        tensionArterialSistolica.setPreferredSize(new java.awt.Dimension(70, 20));

        textoTensionArterialSistolica.setFont(Fuente.FUENTE_LABEL);
        textoTensionArterialSistolica.setForeground(Fuente.COLOR_NORMAL);
        textoTensionArterialSistolica.setText("Tensión arterial Sistólica (mmHg) ");
        textoTensionArterialSistolica.setPreferredSize(new java.awt.Dimension(179, 20));

        textoTensionArterialDiastolica.setFont(Fuente.FUENTE_LABEL);
        textoTensionArterialDiastolica.setForeground(Fuente.COLOR_NORMAL);
        textoTensionArterialDiastolica.setText("Tensión arterial Diastólica (mmHg)");
        textoTensionArterialDiastolica.setPreferredSize(new java.awt.Dimension(179, 20));

        eva.setFont(Fuente.FUENTE_TEXTFIELD);
        eva.setPreferredSize(new java.awt.Dimension(70, 20));

        textoTiempoFocoNeurologico.setFont(Fuente.FUENTE_LABEL);
        textoTiempoFocoNeurologico.setForeground(Fuente.COLOR_NORMAL);
        textoTiempoFocoNeurologico.setText("Tiempo de foco neurológico (minutos)");
        textoTiempoFocoNeurologico.setPreferredSize(new java.awt.Dimension(179, 20));

        tiempoFocoNeurologico.setFont(Fuente.FUENTE_TEXTFIELD);
        tiempoFocoNeurologico.setPreferredSize(new java.awt.Dimension(70, 20));

        glucemia.setFont(Fuente.FUENTE_TEXTFIELD);
        glucemia.setPreferredSize(new java.awt.Dimension(70, 20));

        textoGlucemia.setFont(Fuente.FUENTE_LABEL);
        textoGlucemia.setForeground(Fuente.COLOR_NORMAL);
        textoGlucemia.setText("Glucemia (mg/dL)");
        textoGlucemia.setPreferredSize(new java.awt.Dimension(179, 20));

        saturacionOxigeno.setFont(Fuente.FUENTE_TEXTFIELD);
        saturacionOxigeno.setPreferredSize(new java.awt.Dimension(70, 20));

        textoTemperatura.setFont(Fuente.FUENTE_LABEL);
        textoTemperatura.setForeground(Fuente.COLOR_NORMAL);
        textoTemperatura.setText("Temperatura (Cº) ");
        textoTemperatura.setPreferredSize(new java.awt.Dimension(179, 20));

        frecuenciaRespiratoria.setFont(Fuente.FUENTE_TEXTFIELD);
        frecuenciaRespiratoria.setPreferredSize(new java.awt.Dimension(70, 20));

        textoSaturacionOxigeno.setFont(Fuente.FUENTE_LABEL);
        textoSaturacionOxigeno.setForeground(Fuente.COLOR_NORMAL);
        textoSaturacionOxigeno.setText("Saturación de oxígeno (%)");
        textoSaturacionOxigeno.setPreferredSize(new java.awt.Dimension(179, 20));

        temperatura.setFont(Fuente.FUENTE_TEXTFIELD);
        temperatura.setModel(new javax.swing.SpinnerNumberModel(Float.valueOf(0.0f), null, null, Float.valueOf(0.5f)));
        temperatura.setPreferredSize(new java.awt.Dimension(70, 20));

        textoEVA.setFont(Fuente.FUENTE_LABEL);
        textoEVA.setForeground(Fuente.COLOR_NORMAL);
        textoEVA.setText("EVA (Escala visual análoga)");
        textoEVA.setPreferredSize(new java.awt.Dimension(179, 20));

        frecuenciaCardiaca.setFont(Fuente.FUENTE_TEXTFIELD);
        frecuenciaCardiaca.setPreferredSize(new java.awt.Dimension(70, 20));

        tensionArterialDiastolica.setFont(Fuente.FUENTE_TEXTFIELD);
        tensionArterialDiastolica.setPreferredSize(new java.awt.Dimension(70, 20));

        textoFrecuenciaCardiaca.setFont(Fuente.FUENTE_LABEL);
        textoFrecuenciaCardiaca.setForeground(Fuente.COLOR_NORMAL);
        textoFrecuenciaCardiaca.setText("Frecuencia cardíaca (por minuto) ");
        textoFrecuenciaCardiaca.setPreferredSize(new java.awt.Dimension(179, 20));

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(textoTensionArterialSistolica, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(textoTensionArterialDiastolica, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(textoFrecuenciaCardiaca, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(textoFrecuenciaRespiratoria, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(textoSaturacionOxigeno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(textoTemperatura, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(textoEVA, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(textoGlucemia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(textoTiempoFocoNeurologico, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 10, Short.MAX_VALUE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(tensionArterialSistolica, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(tensionArterialDiastolica, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(frecuenciaCardiaca, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(frecuenciaRespiratoria, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(saturacionOxigeno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(temperatura, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(eva, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(glucemia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(tiempoFocoNeurologico, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(tensionArterialSistolica, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(tensionArterialDiastolica, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(frecuenciaCardiaca, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(11, 11, 11)
                        .addComponent(frecuenciaRespiratoria, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(saturacionOxigeno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(temperatura, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(eva, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(glucemia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(tiempoFocoNeurologico, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(textoTensionArterialSistolica, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(textoTensionArterialDiastolica, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(textoFrecuenciaCardiaca, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(11, 11, 11)
                        .addComponent(textoFrecuenciaRespiratoria, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(textoSaturacionOxigeno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(textoTemperatura, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(textoEVA, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(textoGlucemia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(textoTiempoFocoNeurologico, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents

    /**
     * Setea en cada componente del JDialog los eventos que capturarán la tecla
     * enter y escape.
     */
    public void setearEventosQueCapturanTeclaEnterYEscape(
            KeyListener keyListenerEnter, KeyListener keyListenerEscape) {
        //Setear eventos
        ((DefaultEditor) tensionArterialSistolica.getEditor()).
                getTextField().addKeyListener(keyListenerEnter);
        ((DefaultEditor) tensionArterialSistolica.getEditor()).
                getTextField().addKeyListener(keyListenerEscape);
        ((DefaultEditor) tensionArterialDiastolica.getEditor()).
                getTextField().addKeyListener(keyListenerEnter);
        ((DefaultEditor) tensionArterialDiastolica.getEditor()).
                getTextField().addKeyListener(keyListenerEscape);
        ((DefaultEditor) frecuenciaCardiaca.getEditor()).
                getTextField().addKeyListener(keyListenerEnter);
        ((DefaultEditor) frecuenciaCardiaca.getEditor()).
                getTextField().addKeyListener(keyListenerEscape);
        ((DefaultEditor) frecuenciaRespiratoria.getEditor()).
                getTextField().addKeyListener(keyListenerEnter);
        ((DefaultEditor) frecuenciaRespiratoria.getEditor()).
                getTextField().addKeyListener(keyListenerEscape);
        ((DefaultEditor) saturacionOxigeno.getEditor()).
                getTextField().addKeyListener(keyListenerEnter);
        ((DefaultEditor) saturacionOxigeno.getEditor()).
                getTextField().addKeyListener(keyListenerEscape);
        ((DefaultEditor) temperatura.getEditor()).
                getTextField().addKeyListener(keyListenerEnter);
        ((DefaultEditor) temperatura.getEditor()).
                getTextField().addKeyListener(keyListenerEscape);
        ((DefaultEditor) eva.getEditor()).
                getTextField().addKeyListener(keyListenerEnter);
        ((DefaultEditor) glucemia.getEditor()).
                getTextField().addKeyListener(keyListenerEscape);
        ((DefaultEditor) tiempoFocoNeurologico.getEditor()).
                getTextField().addKeyListener(keyListenerEnter);
        ((DefaultEditor) tiempoFocoNeurologico.getEditor()).
                getTextField().addKeyListener(keyListenerEscape);
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JSpinner eva;
    private javax.swing.JSpinner frecuenciaCardiaca;
    private javax.swing.JSpinner frecuenciaRespiratoria;
    private javax.swing.JSpinner glucemia;
    private javax.swing.JSpinner saturacionOxigeno;
    private javax.swing.JSpinner temperatura;
    private javax.swing.JSpinner tensionArterialDiastolica;
    private javax.swing.JSpinner tensionArterialSistolica;
    private javax.swing.JLabel textoEVA;
    private javax.swing.JLabel textoFrecuenciaCardiaca;
    private javax.swing.JLabel textoFrecuenciaRespiratoria;
    private javax.swing.JLabel textoGlucemia;
    private javax.swing.JLabel textoSaturacionOxigeno;
    private javax.swing.JLabel textoTemperatura;
    private javax.swing.JLabel textoTensionArterialDiastolica;
    private javax.swing.JLabel textoTensionArterialSistolica;
    private javax.swing.JLabel textoTiempoFocoNeurologico;
    private javax.swing.JSpinner tiempoFocoNeurologico;
    // End of variables declaration//GEN-END:variables

}
